package de.wepner.texteditor.command;

import java.awt.Component;
import java.awt.Dialog.ModalityType;
import java.awt.event.ActionEvent;

import de.wepner.texteditor.ui.AboutDialog;


/**
 * <p>Shows the {@link AboutDialog}.</p>
 * 
 * @author Richard
 */
public class AboutCommand extends Command {
    
    private Component window;
    
    
    public AboutCommand(Component window) {
        this.window = window;
    }
    
    
    @Override
    public void actionPerformed(ActionEvent e) {
        AboutDialog window = new AboutDialog(this.window);
        window.setModal(true);
        window.setModalityType(ModalityType.APPLICATION_MODAL);
        window.setVisible(true);
    }
}
